library(ggplot2)
library(reshape2)
library(plyr)
library(dplyr)
library(car)
library(multcomp)
library(data.table)
library(lme4)
library(lmerTest)
library(emmeans)
SRMort <- read.csv("Soil_Rhiz_All_Data20Feb2018.csv")
TrapMort <- read.csv("Trapping_Alll_Data20Feb2018.csv")
SRMort <- within(SRMort, Soil <- as.factor(paste(SoilConc, Inoculate)))
I compared survival rate using two models, in the first, I used the Medicago genotypes as a random variable along with a variable “Treat” that refers to the addition of soil, buffer, or WSM. The second model uses the variable “Treatment”, which divides the soil variable into their identities. However, due to a deficiency of DFs, Genotype can not be included.
MortMod <- glmer(as.factor(Dead_0) ~ Treat * Range + (1 | Genotype), family = binomial(link = "logit"), data = TrapMort)
MortMod2 <- glm(as.factor(Dead_0) ~ Treatment * Range, family = binomial(link = "logit"), data = TrapMort)
## Analysis of Deviance Table (Type II Wald chisquare tests)
##
## Response: as.factor(Dead_0)
## Chisq Df Pr(>Chisq)
## Treat 51.8972 2 5.379e-12 ***
## Range 0.0475 1 0.8275
## Treat:Range 0.0080 2 0.9960
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: as.factor(Dead_0)
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 347 453.29
## Treatment 9 198.124 338 255.16 <2e-16 ***
## Range 1 0.019 337 255.14 0.8902
## Treatment:Range 9 8.957 328 246.19 0.4413
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The results show that Treat(ment) is significant but that Range is not significant.
I don’t think the Biomass data should be included for this portion of the paper since data was only taken on the WSM and buffer plants. The results show that Treat(ment) is significant but that Range is not significant for all data.
ShootMod <- lmer(ShootWeight ~ Treatment * Range + (1| Genotype), data = TrapBio)
## Analysis of Variance Table of type III with Satterthwaite
## approximation for degrees of freedom
## Sum Sq Mean Sq NumDF DenDF F.value Pr(>F)
## Treatment 0.052655 0.052655 1 45.914 29.7477 1.898e-06 ***
## Range 0.002725 0.002725 1 10.344 1.5395 0.2421
## Treatment:Range 0.000224 0.000224 1 45.914 0.1264 0.7238
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
RootMod <- lmer(RootWeight ~ Treatment * Range + (1| Genotype), data = TrapBio)
## Analysis of Variance Table of type III with Satterthwaite
## approximation for degrees of freedom
## Sum Sq Mean Sq NumDF DenDF F.value Pr(>F)
## Treatment 0.00081642 0.00081642 1 45.295 17.6854 0.0001214 ***
## Range 0.00002627 0.00002627 1 10.243 0.5690 0.4676507
## Treatment:Range 0.00004000 0.00004000 1 45.295 0.8665 0.3568678
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
NNMod <- lmer(NodNum ~ Range + (1| Genotype), data = TrapBio)
## Analysis of Variance Table of type III with Satterthwaite
## approximation for degrees of freedom
## Sum Sq Mean Sq NumDF DenDF F.value Pr(>F)
## Range 330.42 330.42 1 10.378 2.2672 0.162
NWMod <- lmer(NodWeight ~ Range + (1| Genotype), data = TrapBio)
## Analysis of Variance Table of type III with Satterthwaite
## approximation for degrees of freedom
## Sum Sq Mean Sq NumDF DenDF F.value Pr(>F)
## Range 4.6937e-06 4.6937e-06 1 9.6546 1.6373 0.2306
First, I ran survival as a function of all 10 treatments as defined by Katie
SRMortMod <- glm(DeadOrAlive ~ Treatment , family = binomial(link = "logit"), data = SRMort)
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: DeadOrAlive
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 119 151.34
## Treatment 9 34.166 110 117.17 8.355e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Treatment was significant. I also ran a Tukey mult comp test (results not shown). The only significance was between soil and buffer/wsm. All other comparisons were not significant.
The final graph suggests that there might be an effect of soil location on mortality.
SRMortMod3 <- glm(DeadOrAlive ~ Soil * Range * SoilLocation, family = binomial(link = "logit"), data = SRMort)
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: DeadOrAlive
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 119 151.34
## Soil 5 28.2572 114 123.08 3.242e-05 ***
## Range 1 0.0463 113 123.04 0.82956
## SoilLocation 1 0.0000 112 123.04 1.00000
## Soil:Range 5 1.6576 107 121.38 0.89420
## Soil:SoilLocation 3 5.9083 104 115.47 0.11616
## Range:SoilLocation 1 1.1620 103 114.31 0.28105
## Soil:Range:SoilLocation 3 9.9904 100 104.32 0.01865 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
To try and parse out differences between will run some multiple comparisons and maybe some different contrasts.
tt = lsmeans(SRMortMod3, specs = ~ Range | Soil:SoilLocation)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Soil SoilLocation estimate SE df
## Native - Invasive high Buffer FL 1.431178e-07 6208.832295 Inf
## Native - Invasive high WSM FL -1.956607e+01 4390.307472 Inf
## Native - Invasive low Buffer FL -1.661515e-15 1.154701 Inf
## Native - Invasive low WSM FL 6.931472e-01 1.190238 Inf
## Native - Invasive none Buffer FL nonEst NA NA
## Native - Invasive none WSM FL nonEst NA NA
## Native - Invasive high Buffer none nonEst NA NA
## Native - Invasive high WSM none nonEst NA NA
## Native - Invasive low Buffer none nonEst NA NA
## Native - Invasive low WSM none nonEst NA NA
## Native - Invasive none Buffer none 1.386294e+00 1.224745 Inf
## Native - Invasive none WSM none -6.931472e-01 1.190238 Inf
## Native - Invasive high Buffer PT -4.819478e-08 6208.832288 Inf
## Native - Invasive high WSM PT 1.956607e+01 4390.307474 Inf
## Native - Invasive low Buffer PT -3.702069e-15 1.549193 Inf
## Native - Invasive low WSM PT -9.162907e-01 1.396424 Inf
## Native - Invasive none Buffer PT nonEst NA NA
## Native - Invasive none WSM PT nonEst NA NA
## z.ratio p.value
## 0.000 1.0000
## -0.004 0.9964
## 0.000 1.0000
## 0.582 0.5603
## NA NA
## NA NA
## NA NA
## NA NA
## NA NA
## NA NA
## 1.132 0.2577
## -0.582 0.5603
## 0.000 1.0000
## 0.004 0.9964
## 0.000 1.0000
## -0.656 0.5117
## NA NA
## NA NA
##
## Results are given on the log odds ratio (not the response) scale.
pairs(dd, by = "Soil")
## Soil = high Buffer:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT 1.913126e-07 8780.614833
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df z.ratio p.value
## NA NA NA
## Inf 0.000 1.0000
## NA NA NA
##
## Soil = high WSM:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT -3.913214e+01 6208.832371
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df z.ratio p.value
## NA NA NA
## Inf -0.006 1.0000
## NA NA NA
##
## Soil = low Buffer:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT 2.040555e-15 1.932184
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df z.ratio p.value
## NA NA NA
## Inf 0.000 1.0000
## NA NA NA
##
## Soil = low WSM:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT 1.609438e+00 1.834848
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df z.ratio p.value
## NA NA NA
## Inf 0.877 0.6547
## NA NA NA
##
## Soil = none Buffer:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT nonEst NA
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df z.ratio p.value
## NA NA NA
## NA NA NA
## NA NA NA
##
## Soil = none WSM:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT nonEst NA
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df z.ratio p.value
## NA NA NA
## NA NA NA
## NA NA NA
##
## P value adjustment: tukey method for comparing a family of 3 estimates
I found a this on line:link
My ANOVA F is significant, but no pairwise comparisons are {#anova} This is a common misunderstanding of ANOVA. If F is significant, this implies only that some contrast among the means (or effects) is statistically significant (compared to a Scheffé critical value). That contrast may be very much unlike a pairwise comparison, especially when there are several means being compared. Another factor is that by default, P values for pairwise comparisons are adjusted using the Tukey method, and the adjusted P values can be quite a bit larger than the unadjusted ones. (But I definitely do not advocate using no adjustment to “repair” this problem.)
ShootModSR <- lm(ShootWeight ~ Treatment * Range, data = SRMort)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## Treatment 7 0.73327 0.104752 11.6884 1.633e-06 ***
## Range 1 0.09575 0.095754 10.6843 0.003139 **
## Treatment:Range 5 0.08405 0.016809 1.8756 0.134645
## Residuals 25 0.22405 0.008962
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ShootModSR <- lm(ShootWeight ~ Soil * Range * SoilLocation, data = SRMort)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## Soil 4 0.66769 0.166922 18.6253 3.286e-07 ***
## Range 1 0.11600 0.116001 12.9435 0.001381 **
## SoilLocation 1 0.03895 0.038953 4.3465 0.047456 *
## Soil:Range 4 0.08184 0.020460 2.2830 0.088648 .
## Soil:SoilLocation 1 0.00276 0.002760 0.3080 0.583863
## Range:SoilLocation 1 0.00348 0.003484 0.3888 0.538601
## Soil:Range:SoilLocation 1 0.00234 0.002340 0.2611 0.613833
## Residuals 25 0.22405 0.008962
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The main effects are significantly different
ShootModSR <- lm(ShootWeight ~ Soil, data = SRMort)
summary(glht(ShootModSR, mcp(Soil = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = ShootWeight ~ Soil, data = SRMort)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low Buffer - high WSM == 0 -0.192504 0.063459 -3.034 0.0341 *
## low WSM - high WSM == 0 0.101383 0.057335 1.768 0.4036
## none Buffer - high WSM == 0 -0.214100 0.067840 -3.156 0.0254 *
## none WSM - high WSM == 0 0.007453 0.071151 0.105 1.0000
## low WSM - low Buffer == 0 0.293887 0.052077 5.643 <0.001 ***
## none Buffer - low Buffer == 0 -0.021596 0.063459 -0.340 0.9969
## none WSM - low Buffer == 0 0.199957 0.066987 2.985 0.0383 *
## none Buffer - low WSM == 0 -0.315483 0.057335 -5.502 <0.001 ***
## none WSM - low WSM == 0 -0.093930 0.061217 -1.534 0.5436
## none WSM - none Buffer == 0 0.221553 0.071151 3.114 0.0281 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
mod <- lm(ShootWeight ~ Soil * Range, data = SRMort)
tt = lsmeans(mod, specs = ~ Range | Soil)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Soil estimate SE df t.ratio p.value
## Native - Invasive high WSM 0.08546667 0.07821987 29 1.093 0.2835
## Native - Invasive low Buffer 0.00257500 0.06774040 29 0.038 0.9699
## Native - Invasive low WSM 0.22255714 0.05120693 29 4.346 0.0002
## Native - Invasive none Buffer -0.00835000 0.08296471 29 -0.101 0.9205
## Native - Invasive none WSM 0.12536667 0.08745248 29 1.434 0.1624
Soil x Range is nearly significant, so will do comparisons of soil within each range
SRMort_N <- subset(SRMort, Range == " Native")
ShootModSRs <- lm(ShootWeight ~ Soil , data = SRMort_N)
anova(ShootModSRs)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## Soil 4 0.55673 0.139183 10.487 0.0003839 ***
## Residuals 14 0.18581 0.013272
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(glht(ShootModSRs, mcp(Soil = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = ShootWeight ~ Soil, data = SRMort_N)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low Buffer - high WSM == 0 -0.23395 0.08799 -2.659 0.10967
## low WSM - high WSM == 0 0.16993 0.07950 2.138 0.25425
## none Buffer - high WSM == 0 -0.26240 0.10517 -2.495 0.14478
## none WSM - high WSM == 0 0.01487 0.09406 0.158 0.99984
## low WSM - low Buffer == 0 0.40388 0.07221 5.593 < 0.001 ***
## none Buffer - low Buffer == 0 -0.02845 0.09977 -0.285 0.99832
## none WSM - low Buffer == 0 0.24882 0.08799 2.828 0.08183 .
## none Buffer - low WSM == 0 -0.43233 0.09237 -4.680 0.00269 **
## none WSM - low WSM == 0 -0.15506 0.07950 -1.951 0.33255
## none WSM - none Buffer == 0 0.27727 0.10517 2.636 0.11402
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
SRMort_I <- subset(SRMort, Range == "Invasive")
ShootModSRs <- lm(ShootWeight ~ Soil , data = SRMort_I)
Anova(ShootModSRs, type = "3")
## Anova Table (Type III tests)
##
## Response: ShootWeight
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.103268 1 19.2806 0.0005263 ***
## Soil 0.153393 4 7.1598 0.0019682 **
## Residuals 0.080341 15
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(glht(ShootModSRs, mcp(Soil = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = ShootWeight ~ Soil, data = SRMort_I)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low Buffer - high WSM == 0 -0.15106 0.05590 -2.702 0.09862 .
## low WSM - high WSM == 0 0.03284 0.05050 0.650 0.96306
## none Buffer - high WSM == 0 -0.16858 0.05590 -3.016 0.05577 .
## none WSM - high WSM == 0 -0.02503 0.06681 -0.375 0.99521
## low WSM - low Buffer == 0 0.18390 0.04587 4.009 0.00832 **
## none Buffer - low Buffer == 0 -0.01752 0.05175 -0.339 0.99675
## none WSM - low Buffer == 0 0.12603 0.06338 1.988 0.31267
## none Buffer - low WSM == 0 -0.20142 0.04587 -4.391 0.00397 **
## none WSM - low WSM == 0 -0.05787 0.05868 -0.986 0.85451
## none WSM - none Buffer == 0 0.14355 0.06338 2.265 0.20606
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
RootModSR <- lm(RootWeight ~ Treatment * Range, data = SRMort)
anova(RootModSR)
## Analysis of Variance Table
##
## Response: RootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## Treatment 7 0.0210114 0.0030016 16.305 7.011e-08 ***
## Range 1 0.0107698 0.0107698 58.501 5.277e-08 ***
## Treatment:Range 5 0.0079005 0.0015801 8.583 7.710e-05 ***
## Residuals 25 0.0046024 0.0001841
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
RootModSR <- lm(RootWeight ~ Soil * Range * SoilLocation, data = SRMort)
anova(RootModSR)
## Analysis of Variance Table
##
## Response: RootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## Soil 4 0.0200836 0.0050209 27.2732 8.506e-09 ***
## Range 1 0.0104877 0.0104877 56.9683 6.676e-08 ***
## SoilLocation 1 0.0000243 0.0000243 0.1323 0.7191603
## Soil:Range 4 0.0065723 0.0016431 8.9250 0.0001277 ***
## Soil:SoilLocation 1 0.0009471 0.0009471 5.1446 0.0322140 *
## Range:SoilLocation 1 0.0009994 0.0009994 5.4285 0.0281815 *
## Soil:Range:SoilLocation 1 0.0005673 0.0005673 3.0817 0.0914281 .
## Residuals 25 0.0046024 0.0001841
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Root biomass show significant differences in main effects and some interactions.
tt = lsmeans(RootModSR, specs = ~ Range | Soil:SoilLocation)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Soil SoilLocation estimate SE df
## Native - Invasive high WSM FL nonEst NA NA
## Native - Invasive low Buffer FL 0.005366667 0.011078402 25
## Native - Invasive low WSM FL 0.089000000 0.012386030 25
## Native - Invasive none Buffer FL nonEst NA NA
## Native - Invasive none WSM FL nonEst NA NA
## Native - Invasive high WSM none nonEst NA NA
## Native - Invasive low Buffer none nonEst NA NA
## Native - Invasive low WSM none nonEst NA NA
## Native - Invasive none Buffer none 0.000150000 0.011750420 25
## Native - Invasive none WSM none 0.062916667 0.012386030 25
## Native - Invasive high WSM PT nonEst NA NA
## Native - Invasive low Buffer PT 0.007900000 0.019188355 25
## Native - Invasive low WSM PT 0.044195000 0.009101836 25
## Native - Invasive none Buffer PT nonEst NA NA
## Native - Invasive none WSM PT nonEst NA NA
## t.ratio p.value
## NA NA
## 0.484 0.6323
## 7.186 <.0001
## NA NA
## NA NA
## NA NA
## NA NA
## NA NA
## 0.013 0.9899
## 5.080 <.0001
## NA NA
## 0.412 0.6841
## 4.856 0.0001
## NA NA
## NA NA
pairs(dd, by = "Soil")
## Soil = high WSM:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT nonEst NA
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df t.ratio p.value
## NA NA NA
## NA NA NA
## NA NA NA
##
## Soil = low Buffer:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT -0.002533333 0.02215680
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df t.ratio p.value
## NA NA NA
## 25 -0.114 0.9928
## NA NA NA
##
## Soil = low WSM:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT 0.044805000 0.01537066
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df t.ratio p.value
## NA NA NA
## 25 2.915 0.0196
## NA NA NA
##
## Soil = none Buffer:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT nonEst NA
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df t.ratio p.value
## NA NA NA
## NA NA NA
## NA NA NA
##
## Soil = none WSM:
## contrast estimate SE
## Native - Invasive,FL - Native - Invasive,none nonEst NA
## Native - Invasive,FL - Native - Invasive,PT nonEst NA
## Native - Invasive,none - Native - Invasive,PT nonEst NA
## df t.ratio p.value
## NA NA NA
## NA NA NA
## NA NA NA
##
## P value adjustment: tukey method for comparing a family of 3 estimates
NNModSR <- lm(NodNum ~ Treatment * Range, data = SRMort)
anova(NNModSR)
## Analysis of Variance Table
##
## Response: NodNum
## Df Sum Sq Mean Sq F value Pr(>F)
## Treatment 7 3153.07 450.44 15.3621 1.255e-07 ***
## Range 1 684.20 684.20 23.3344 5.780e-05 ***
## Treatment:Range 5 707.39 141.48 4.8251 0.003178 **
## Residuals 25 733.03 29.32
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
NNModSR <- lm(NodNum ~ Soil * Range * SoilLocation, data = SRMort)
anova(NNModSR)
## Analysis of Variance Table
##
## Response: NodNum
## Df Sum Sq Mean Sq F value Pr(>F)
## Soil 4 2935.44 733.86 25.0282 1.993e-08 ***
## Range 1 714.52 714.52 24.3686 4.393e-05 ***
## SoilLocation 1 171.53 171.53 5.8499 0.023190 *
## Soil:Range 4 684.11 171.03 5.8328 0.001856 **
## Soil:SoilLocation 1 31.74 31.74 1.0825 0.308106
## Range:SoilLocation 1 7.19 7.19 0.2451 0.624898
## Soil:Range:SoilLocation 1 0.14 0.14 0.0046 0.946215
## Residuals 25 733.03 29.32
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Soil x Range interaction was significant so looked at each within range for nodule number.
# Native
NNModSRs <- lm(NodNum ~ Soil , data = SRMort_N)
anova(NNModSRs)
## Analysis of Variance Table
##
## Response: NodNum
## Df Sum Sq Mean Sq F value Pr(>F)
## Soil 4 2654.31 663.58 14.23 7.731e-05 ***
## Residuals 14 652.85 46.63
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(glht(NNModSRs, mcp(Soil = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = NodNum ~ Soil, data = SRMort_N)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low Buffer - high WSM == 0 -14.750 5.216 -2.828 0.08178 .
## low WSM - high WSM == 0 12.286 4.712 2.607 0.11991
## none Buffer - high WSM == 0 -17.000 6.234 -2.727 0.09759 .
## none WSM - high WSM == 0 7.333 5.576 1.315 0.68198
## low WSM - low Buffer == 0 27.036 4.280 6.317 < 0.001 ***
## none Buffer - low Buffer == 0 -2.250 5.914 -0.380 0.99488
## none WSM - low Buffer == 0 22.083 5.216 4.234 0.00612 **
## none Buffer - low WSM == 0 -29.286 5.475 -5.349 < 0.001 ***
## none WSM - low WSM == 0 -4.952 4.712 -1.051 0.82433
## none WSM - none Buffer == 0 24.333 6.234 3.903 0.01142 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
# Invasive
NNModSRs <- lm(NodNum ~ Soil , data = SRMort_I)
Anova(NNModSRs, type = "3")
## Anova Table (Type III tests)
##
## Response: NodNum
## Sum Sq Df F value Pr(>F)
## (Intercept) 507.00 1 37.695 1.893e-05 ***
## Soil 747.20 4 13.889 6.251e-05 ***
## Residuals 201.75 15
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(glht(NNModSRs, mcp(Soil = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = NodNum ~ Soil, data = SRMort_I)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low Buffer - high WSM == 0 -11.250 2.801 -4.016 0.00814 **
## low WSM - high WSM == 0 -4.000 2.531 -1.581 0.52522
## none Buffer - high WSM == 0 -12.500 2.801 -4.463 0.00343 **
## none WSM - high WSM == 0 7.000 3.348 2.091 0.26922
## low WSM - low Buffer == 0 7.250 2.299 3.154 0.04325 *
## none Buffer - low Buffer == 0 -1.250 2.593 -0.482 0.98757
## none WSM - low Buffer == 0 18.250 3.176 5.746 < 0.001 ***
## none Buffer - low WSM == 0 -8.500 2.299 -3.698 0.01526 *
## none WSM - low WSM == 0 11.000 2.940 3.741 0.01405 *
## none WSM - none Buffer == 0 19.500 3.176 6.140 < 0.001 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
NWModSR <- lm(NodWeight ~ Treatment * Range, data = SRMort)
anova(NWModSR)
## Analysis of Variance Table
##
## Response: NodWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## Treatment 6 3.6340e-05 6.0570e-06 2.1965 0.09444 .
## Range 1 1.0723e-04 1.0723e-04 38.8893 9.038e-06 ***
## Treatment:Range 3 2.0160e-05 6.7200e-06 2.4371 0.10004
## Residuals 17 4.6876e-05 2.7570e-06
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
NWModSR <- lm(NodWeight ~ Soil * Range * SoilLocation, data = SRMort)
anova(NWModSR)
## Analysis of Variance Table
##
## Response: NodWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## Soil 4 3.3576e-05 8.3940e-06 3.0442 0.04611 *
## Range 1 9.1427e-05 9.1427e-05 33.1568 2.318e-05 ***
## SoilLocation 1 1.4000e-08 1.4000e-08 0.0050 0.94439
## Soil:Range 3 2.3847e-05 7.9490e-06 2.8828 0.06622 .
## Range:SoilLocation 1 1.4869e-05 1.4869e-05 5.3925 0.03290 *
## Residuals 17 4.6876e-05 2.7570e-06
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Here is all of the data that was used in the results section, I didn’t have time to organize it with thoughts to try and get it to you before your flight but I think that it is understandable.
# 26 Feb 2018
# testing the impact of soil on rhizobia
# SRMort_no_none has soil only removed
SRMort <- within(SRMort, Root_Shoot <- 1 / Shoot_Root)
SRMort_no_none <- subset(SRMort, SoilConc != "none")
# Mortality
mod <- glm(DeadOrAlive ~ Soil, family = binomial(link = "logit"), data = SRMort_no_none)
anova(mod, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: DeadOrAlive
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 95 115.898
## Soil 3 25.752 92 90.146 1.075e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mod <- glm(DeadOrAlive ~ SoilConc * Inoculate, family = binomial(link = "logit"), data = SRMort_no_none)
anova(mod, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: DeadOrAlive
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 95 115.898
## SoilConc 1 13.5200 94 102.378 0.000236 ***
## Inoculate 1 8.6705 93 93.708 0.003234 **
## SoilConc:Inoculate 1 3.5618 92 90.146 0.059125 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#SHoot - will continue with this b/c of line 320
mod <- lm(ShootWeight ~ SoilConc * Inoculate, data = SRMort_no_none)
anova(mod)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 0.00014 0.00014 0.0091 0.9248
## Inoculate 1 0.43970 0.43970 28.1909 1.677e-05 ***
## Residuals 25 0.38993 0.01560
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMort_no_none, aes(x = Inoculate, y = ShootWeight, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 68 rows containing non-finite values (stat_summary).
mod <- lm(ShootWeight ~ Soil, data = SRMort_no_none)
anova(mod)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## Soil 2 0.43984 0.219921 14.1 7.95e-05 ***
## Residuals 25 0.38993 0.015597
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMort_no_none, aes(x = Soil, y = ShootWeight)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 68 rows containing non-finite values (stat_summary).
# All high buffer plants died!
SRMortSub2 <- subset(SRMort_no_none, Inoculate == "WSM")
SRMortSub3 <- subset(SRMort, Inoculate == "WSM")
#Mortality
mod <- glm(DeadOrAlive ~ SoilConc * SoilLocation * Range, family = binomial(link = "logit"), data = SRMortSub2)
anova(mod, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: DeadOrAlive
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 47 65.203
## SoilConc 1 5.6092 46 59.593 0.017867 *
## SoilLocation 1 1.5620 45 58.031 0.211373
## Range 1 0.0000 44 58.031 1.000000
## SoilConc:SoilLocation 1 1.2426 43 56.789 0.264971
## SoilConc:Range 1 0.0000 42 56.789 1.000000
## SoilLocation:Range 1 1.6913 41 55.098 0.193435
## SoilConc:SoilLocation:Range 1 9.4611 40 45.636 0.002099 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tt = lsmeans(mod, specs = ~ SoilLocation | SoilConc:Range)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilConc Range estimate SE df z.ratio p.value
## FL - PT high Native -18.5660685 2662.856186 Inf -0.007 0.9944
## FL - PT low Native 2.3025851 1.396424 Inf 1.649 0.0992
## FL - PT high Invasive 18.5660685 2662.856186 Inf 0.007 0.9944
## FL - PT low Invasive 0.6931472 1.190238 Inf 0.582 0.5603
##
## Results are given on the log odds ratio (not the response) scale.
tt = lsmeans(mod, specs = ~ SoilConc | SoilLocation:Range)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilLocation Range estimate SE df z.ratio
## high - low FL Native -0.6931472 1.190238 Inf -0.582
## high - low PT Native 20.1755064 2662.856286 Inf 0.008
## high - low FL Invasive 18.5660685 2662.856186 Inf 0.007
## high - low PT Invasive 0.6931472 1.190238 Inf 0.582
## p.value
## 0.5603
## 0.9940
## 0.9944
## 0.5603
##
## Results are given on the log odds ratio (not the response) scale.
tt = lsmeans(mod, specs = ~ Range | SoilLocation:SoilConc)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilLocation SoilConc estimate SE df
## Native - Invasive FL high -18.5660685 2662.856186 Inf
## Native - Invasive PT high 18.5660685 2662.856186 Inf
## Native - Invasive FL low 0.6931472 1.190238 Inf
## Native - Invasive PT low -0.9162907 1.396424 Inf
## z.ratio p.value
## -0.007 0.9944
## 0.007 0.9944
## 0.582 0.5603
## -0.656 0.5117
##
## Results are given on the log odds ratio (not the response) scale.
ggplot(SRMortSub2, aes(x = SoilConc, y = Survival, colour = SoilConc)) + stat_summary(fun.data = "mean_se") + coord_cartesian(ylim = c(0,1)) +theme_bw()
mod <- glm(DeadOrAlive ~ SoilConc * SoilLocation * Range, family = binomial(link = "logit"), data = SRMortSub3)
anova(mod, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: DeadOrAlive
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 59 81.503
## SoilConc 2 5.6092 57 75.894 0.060531 .
## SoilLocation 1 1.5620 56 74.332 0.211373
## Range 1 0.0775 55 74.255 0.780741
## SoilConc:SoilLocation 1 1.2446 54 73.010 0.264583
## SoilConc:Range 2 0.2652 52 72.745 0.875815
## SoilLocation:Range 1 1.6913 51 71.053 0.193435
## SoilConc:SoilLocation:Range 1 9.4611 50 61.592 0.002099 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub3, aes(x = SoilConc, y = Survival, colour = SoilConc)) + stat_summary(fun.data = "mean_se") + coord_cartesian(ylim = c(0,1)) +theme_bw()
tt = lsmeans(mod, specs = ~ SoilLocation | SoilConc:Range)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilConc Range estimate SE df z.ratio p.value
## FL - none high Native nonEst NA NA NA NA
## FL - PT high Native -18.5660685 2662.856189 Inf -0.007 1.0000
## none - PT high Native nonEst NA NA NA NA
## FL - none low Native nonEst NA NA NA NA
## FL - PT low Native 2.3025851 1.396424 Inf 1.649 0.2252
## none - PT low Native nonEst NA NA NA NA
## FL - none none Native nonEst NA NA NA NA
## FL - PT none Native nonEst NA NA NA NA
## none - PT none Native nonEst NA NA NA NA
## FL - none high Invasive nonEst NA NA NA NA
## FL - PT high Invasive 18.5660685 2662.856183 Inf 0.007 1.0000
## none - PT high Invasive nonEst NA NA NA NA
## FL - none low Invasive nonEst NA NA NA NA
## FL - PT low Invasive 0.6931472 1.190238 Inf 0.582 0.8296
## none - PT low Invasive nonEst NA NA NA NA
## FL - none none Invasive nonEst NA NA NA NA
## FL - PT none Invasive nonEst NA NA NA NA
## none - PT none Invasive nonEst NA NA NA NA
##
## Results are given on the log odds ratio (not the response) scale.
## P value adjustment: tukey method for comparing a family of 3 estimates
tt = lsmeans(mod, specs = ~ SoilConc | SoilLocation:Range)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilLocation Range estimate SE df z.ratio
## high - low FL Native -0.6931472 1.190238 Inf -0.582
## high - none FL Native nonEst NA NA NA
## low - none FL Native nonEst NA NA NA
## high - low none Native nonEst NA NA NA
## high - none none Native nonEst NA NA NA
## low - none none Native nonEst NA NA NA
## high - low PT Native 20.1755064 2662.856289 Inf 0.008
## high - none PT Native nonEst NA NA NA
## low - none PT Native nonEst NA NA NA
## high - low FL Invasive 18.5660685 2662.856183 Inf 0.007
## high - none FL Invasive nonEst NA NA NA
## low - none FL Invasive nonEst NA NA NA
## high - low none Invasive nonEst NA NA NA
## high - none none Invasive nonEst NA NA NA
## low - none none Invasive nonEst NA NA NA
## high - low PT Invasive 0.6931472 1.190238 Inf 0.582
## high - none PT Invasive nonEst NA NA NA
## low - none PT Invasive nonEst NA NA NA
## p.value
## 0.8296
## NA
## NA
## NA
## NA
## NA
## 1.0000
## NA
## NA
## 1.0000
## NA
## NA
## NA
## NA
## NA
## 0.8296
## NA
## NA
##
## Results are given on the log odds ratio (not the response) scale.
## P value adjustment: tukey method for comparing a family of 3 estimates
tt = lsmeans(mod, specs = ~ Range | SoilLocation:SoilConc)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilLocation SoilConc estimate SE df
## Native - Invasive FL high -18.5660685 2662.856183 Inf
## Native - Invasive none high nonEst NA NA
## Native - Invasive PT high 18.5660685 2662.856189 Inf
## Native - Invasive FL low 0.6931472 1.190238 Inf
## Native - Invasive none low nonEst NA NA
## Native - Invasive PT low -0.9162907 1.396424 Inf
## Native - Invasive FL none nonEst NA NA
## Native - Invasive none none -0.6931472 1.190238 Inf
## Native - Invasive PT none nonEst NA NA
## z.ratio p.value
## -0.007 0.9944
## NA NA
## 0.007 0.9944
## 0.582 0.5603
## NA NA
## -0.656 0.5117
## NA NA
## -0.582 0.5603
## NA NA
##
## Results are given on the log odds ratio (not the response) scale.
# I you just compare high vs low WSM, there is a significant difference for survival. If no soil is included, then it becomes marginal due to ns difference from none treatment
# Shoot weight
mod <- lm(ShootWeight ~ SoilConc, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 0.04317 0.04317 2.111 0.1635
## Residuals 18 0.36811 0.02045
ggplot(SRMortSub2, aes(x = SoilConc, y = ShootWeight, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(ShootWeight ~ SoilConc, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 0.05931 0.029653 1.4661 0.2525
## Residuals 22 0.44497 0.020226
ggplot(SRMortSub3, aes(x = SoilConc, y = ShootWeight, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 35 rows containing non-finite values (stat_summary).
summary(glht(mod, mcp(SoilConc = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = ShootWeight ~ SoilConc, data = SRMortSub3)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low - high == 0 0.101383 0.069395 1.461 0.326
## none - high == 0 0.007453 0.086117 0.087 0.996
## none - low == 0 -0.093930 0.074094 -1.268 0.425
## (Adjusted p values reported -- single-step method)
# No sig difference for either subset for shoot weight
# Root weight
mod <- lm(RootWeight ~ SoilConc, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: RootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 0.0019089 0.00190891 1.9488 0.1797
## Residuals 18 0.0176312 0.00097951
ggplot(SRMortSub2, aes(x = SoilConc, y = RootWeight, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(RootWeight ~ SoilConc, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: RootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 0.0029992 0.0014996 1.4049 0.2666
## Residuals 22 0.0234836 0.0010674
ggplot(SRMortSub3, aes(x = SoilConc, y = RootWeight, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 35 rows containing non-finite values (stat_summary).
# No sig diff for either subset, but there is a trend for increased root mass with decreasing soil
# Root:Shoot
mod <- lm(Root_Shoot ~ SoilConc, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: Root_Shoot
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 0.000735 0.0007354 0.1541 0.6992
## Residuals 18 0.085881 0.0047712
ggplot(SRMortSub2, aes(x = SoilConc, y = Root_Shoot, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(Root_Shoot ~ SoilConc, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: Root_Shoot
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 0.09861 0.049305 3.6472 0.04286 *
## Residuals 22 0.29741 0.013519
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub3, aes(x = SoilConc, y = Root_Shoot, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 35 rows containing non-finite values (stat_summary).
summary(glht(mod, mcp(SoilConc = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = Root_Shoot ~ SoilConc, data = SRMortSub3)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low - high == 0 0.01323 0.05673 0.233 0.9702
## none - high == 0 0.16569 0.07040 2.353 0.0680 .
## none - low == 0 0.15245 0.06058 2.517 0.0489 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
# no sig diff for first subset, but second is significant ( p = 0.043). There is no diff between H-L, sig between N-L, marg between N-H.
# Nod number
mod <- lm(NodNum ~ SoilConc, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: NodNum
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 72.09 72.086 0.633 0.4366
## Residuals 18 2049.71 113.873
ggplot(SRMortSub2, aes(x = SoilConc, y = NodNum, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(NodNum ~ SoilConc, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: NodNum
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 160.45 80.223 0.7876 0.4674
## Residuals 22 2240.91 101.860
ggplot(SRMortSub3, aes(x = SoilConc, y = NodNum, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 35 rows containing non-finite values (stat_summary).
summary(glht(mod, mcp(SoilConc = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = NodNum ~ SoilConc, data = SRMortSub3)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low - high == 0 4.143 4.925 0.841 0.679
## none - high == 0 7.600 6.111 1.244 0.438
## none - low == 0 3.457 5.258 0.657 0.788
## (Adjusted p values reported -- single-step method)
# No sig diff for either subset, but there is a trend for increased nod number with decreasing soil
# Nod Weight
mod <- lm(NodWeight ~ SoilConc, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: NodWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 1.1733e-05 1.1733e-05 1.5397 0.2306
## Residuals 18 1.3717e-04 7.6205e-06
ggplot(SRMortSub2, aes(x = SoilConc, y = NodWeight, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(NodWeight ~ SoilConc, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: NodWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 2.5129e-05 1.2564e-05 1.5714 0.2302
## Residuals 22 1.7591e-04 7.9958e-06
ggplot(SRMortSub3, aes(x = SoilConc, y = NodWeight, colour = SoilConc)) + stat_summary(fun.data = "mean_se")
## Warning: Removed 35 rows containing non-finite values (stat_summary).
summary(glht(mod, mcp(SoilConc = "Tukey")))
##
## Simultaneous Tests for General Linear Hypotheses
##
## Multiple Comparisons of Means: Tukey Contrasts
##
##
## Fit: lm(formula = NodWeight ~ SoilConc, data = SRMortSub3)
##
## Linear Hypotheses:
## Estimate Std. Error t value Pr(>|t|)
## low - high == 0 0.001671 0.001380 1.211 0.456
## none - high == 0 0.003000 0.001712 1.752 0.207
## none - low == 0 0.001329 0.001473 0.902 0.642
## (Adjusted p values reported -- single-step method)
# No sig diff for either subset, but there is a trend for increased nod weight with decreasing soil
# Now running models to see if there is a difference between genotypes
#Mortality
mod <- glm(DeadOrAlive ~ SoilConc * Genotype, family = binomial(link = "logit"), data = SRMortSub2)
anova(mod, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: DeadOrAlive
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 47 65.203
## SoilConc 1 5.6092 46 59.593 0.01787 *
## Genotype 1 0.0000 45 59.593 1.00000
## SoilConc:Genotype 1 0.0000 44 59.593 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub2, aes(x = SoilConc, y = Survival, colour = Genotype)) + stat_summary(fun.data = "mean_se") + coord_cartesian(ylim = c(0,1)) +theme_bw() + facet_wrap(~Genotype)
mod <- glm(DeadOrAlive ~ SoilConc * Genotype, family = binomial(link = "logit"), data = SRMortSub3)
anova(mod, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: DeadOrAlive
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 59 81.503
## SoilConc 2 5.6092 57 75.894 0.06053 .
## Genotype 1 0.0755 56 75.819 0.78350
## SoilConc:Genotype 2 0.2692 54 75.549 0.87406
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub3, aes(x = SoilConc, y = Survival, colour = Genotype)) + stat_summary(fun.data = "mean_se") + coord_cartesian(ylim = c(0,1)) +theme_bw() + facet_wrap(~ Genotype)
# Genotype NS for mortality for either
# Shoot weight
mod <- lm(ShootWeight ~ SoilConc* Genotype, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 0.043170 0.043170 3.7582 0.070396 .
## Genotype 1 0.164584 0.164584 14.3281 0.001622 **
## SoilConc:Genotype 1 0.019733 0.019733 1.7179 0.208462
## Residuals 16 0.183788 0.011487
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub2, aes(x = SoilConc, y = ShootWeight, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(ShootWeight ~ SoilConc * Genotype, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: ShootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 0.059307 0.029653 2.3301 0.12444
## Genotype 1 0.180403 0.180403 14.1759 0.00131 **
## SoilConc:Genotype 2 0.022775 0.011388 0.8948 0.42522
## Residuals 19 0.241795 0.012726
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub3, aes(x = SoilConc, y = ShootWeight, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 35 rows containing non-finite values (stat_summary).
tt = emmeans(mod, ~ SoilConc|Genotype)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Genotype estimate SE df t.ratio p.value
## high - low PI493292 -0.16992857 0.07784616 19 -2.183 0.1000
## high - none PI493292 -0.01486667 0.09210882 19 -0.161 0.9858
## low - none PI493292 0.15506190 0.07784616 19 1.992 0.1414
## high - low StAug2 -0.03283810 0.07784616 19 -0.422 0.9070
## high - none StAug2 0.02503333 0.10298079 19 0.243 0.9680
## low - none StAug2 0.05787143 0.09044907 19 0.640 0.8002
##
## P value adjustment: tukey method for comparing a family of 3 estimates
pairs(tt, simple = "Genotype")
## Genotype = PI493292:
## contrast estimate SE df t.ratio p.value
## high - low -0.16992857 0.07784616 19 -2.183 0.1000
## high - none -0.01486667 0.09210882 19 -0.161 0.9858
## low - none 0.15506190 0.07784616 19 1.992 0.1414
##
## Genotype = StAug2:
## contrast estimate SE df t.ratio p.value
## high - low -0.03283810 0.07784616 19 -0.422 0.9070
## high - none 0.02503333 0.10298079 19 0.243 0.9680
## low - none 0.05787143 0.09044907 19 0.640 0.8002
##
## P value adjustment: tukey method for comparing a family of 3 estimates
tt = emmeans(mod, ~ Genotype| SoilConc)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilConc estimate SE df t.ratio p.value
## PI493292 - StAug2 high 0.08546667 0.09210882 19 0.928 0.3651
## PI493292 - StAug2 low 0.22255714 0.06029938 19 3.691 0.0016
## PI493292 - StAug2 none 0.12536667 0.10298079 19 1.217 0.2384
pairs(tt, simple = "Genotype")
## SoilConc = high:
## contrast estimate SE df t.ratio p.value
## PI493292 - StAug2 0.08546667 0.09210882 19 0.928 0.3651
##
## SoilConc = low:
## contrast estimate SE df t.ratio p.value
## PI493292 - StAug2 0.22255714 0.06029938 19 3.691 0.0016
##
## SoilConc = none:
## contrast estimate SE df t.ratio p.value
## PI493292 - StAug2 0.12536667 0.10298079 19 1.217 0.2384
# Using emmeans, there is a difference between ST. Aug and PI493292 at low WSM levels.
# Root weight
mod <- lm(RootWeight ~ SoilConc * Genotype, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: RootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 0.0019089 0.0019089 5.5647 0.03137 *
## Genotype 1 0.0104425 0.0104425 30.4409 4.684e-05 ***
## SoilConc:Genotype 1 0.0017001 0.0017001 4.9559 0.04072 *
## Residuals 16 0.0054886 0.0003430
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub2, aes(x = SoilConc, y = RootWeight, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(RootWeight ~ SoilConc * Genotype, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: RootWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 0.0029992 0.0014996 4.3231 0.02836 *
## Genotype 1 0.0149058 0.0149058 42.9702 2.819e-06 ***
## SoilConc:Genotype 2 0.0019869 0.0009935 2.8639 0.08183 .
## Residuals 19 0.0065909 0.0003469
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub3, aes(x = SoilConc, y = RootWeight, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 35 rows containing non-finite values (stat_summary).
tt = emmeans(mod, ~ SoilConc|Genotype)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Genotype estimate SE df t.ratio p.value
## high - low PI493292 -0.041438095 0.01285240 19 -3.224 0.0119
## high - none PI493292 -0.047833333 0.01520717 19 -3.145 0.0141
## low - none PI493292 -0.006395238 0.01285240 19 -0.498 0.8733
## high - low StAug2 -0.001200000 0.01285240 19 -0.093 0.9952
## high - none StAug2 -0.002450000 0.01700213 19 -0.144 0.9886
## low - none StAug2 -0.001250000 0.01493314 19 -0.084 0.9961
##
## P value adjustment: tukey method for comparing a family of 3 estimates
pairs(tt, simple = "Genotype")
## Genotype = PI493292:
## contrast estimate SE df t.ratio p.value
## high - low -0.041438095 0.01285240 19 -3.224 0.0119
## high - none -0.047833333 0.01520717 19 -3.145 0.0141
## low - none -0.006395238 0.01285240 19 -0.498 0.8733
##
## Genotype = StAug2:
## contrast estimate SE df t.ratio p.value
## high - low -0.001200000 0.01285240 19 -0.093 0.9952
## high - none -0.002450000 0.01700213 19 -0.144 0.9886
## low - none -0.001250000 0.01493314 19 -0.084 0.9961
##
## P value adjustment: tukey method for comparing a family of 3 estimates
tt = emmeans(mod, ~ Genotype| SoilConc)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilConc estimate SE df t.ratio p.value
## PI493292 - StAug2 high 0.01753333 0.015207169 19 1.153 0.2632
## PI493292 - StAug2 low 0.05777143 0.009955429 19 5.803 <.0001
## PI493292 - StAug2 none 0.06291667 0.017002132 19 3.701 0.0015
# There is a sig diff in first subset between soil conc, genotype and interaction. In the second, the interaction becomes marginal. Then ran emmeans and found that in Native Geno: H-L and H-N are sig. None in Invasive. But the two genotypes vary sig within low and none for root weight.
# Root:Shoot
mod <- lm(Root_Shoot ~ SoilConc * Genotype, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: Root_Shoot
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 0.000735 0.0007354 0.1951 0.66465
## Genotype 1 0.023189 0.0231887 6.1503 0.02465 *
## SoilConc:Genotype 1 0.002366 0.0023663 0.6276 0.43982
## Residuals 16 0.060326 0.0037704
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub2, aes(x = SoilConc, y = Root_Shoot, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(Root_Shoot ~ SoilConc *Genotype, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: Root_Shoot
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 0.098610 0.049305 4.6958 0.02202 *
## Genotype 1 0.065072 0.065072 6.1974 0.02223 *
## SoilConc:Genotype 2 0.032841 0.016420 1.5639 0.23510
## Residuals 19 0.199497 0.010500
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub3, aes(x = SoilConc, y = Root_Shoot, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 35 rows containing non-finite values (stat_summary).
tt = emmeans(mod, ~ SoilConc|Genotype)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Genotype estimate SE df t.ratio p.value
## high - low PI493292 -0.03696869 0.07071014 19 -0.523 0.8612
## high - none PI493292 -0.24647493 0.08366537 19 -2.946 0.0216
## low - none PI493292 -0.20950623 0.07071014 19 -2.963 0.0208
## high - low StAug2 0.01050360 0.07071014 19 0.149 0.9879
## high - none StAug2 -0.03578879 0.09354073 19 -0.383 0.9228
## low - none StAug2 -0.04629238 0.08215776 19 -0.563 0.8409
##
## P value adjustment: tukey method for comparing a family of 3 estimates
pairs(tt, simple = "Genotype")
## Genotype = PI493292:
## contrast estimate SE df t.ratio p.value
## high - low -0.03696869 0.07071014 19 -0.523 0.8612
## high - none -0.24647493 0.08366537 19 -2.946 0.0216
## low - none -0.20950623 0.07071014 19 -2.963 0.0208
##
## Genotype = StAug2:
## contrast estimate SE df t.ratio p.value
## high - low 0.01050360 0.07071014 19 0.149 0.9879
## high - none -0.03578879 0.09354073 19 -0.383 0.9228
## low - none -0.04629238 0.08215776 19 -0.563 0.8409
##
## P value adjustment: tukey method for comparing a family of 3 estimates
tt = emmeans(mod, ~ Genotype| SoilConc)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilConc estimate SE df t.ratio p.value
## PI493292 - StAug2 high 0.03487036 0.08366537 19 0.417 0.6815
## PI493292 - StAug2 low 0.08234265 0.05477184 19 1.503 0.1492
## PI493292 - StAug2 none 0.24555650 0.09354073 19 2.625 0.0167
# In the first subset, only genotype is s ( p = 0.025). In the second, soil and genotype but not interaction are s (p = 0.022 for both). Using emmeans, in native sig dif between H-N and L-N (p = 0.0216, 0.0208) non for invasive. Between genotypes, only none is sig ( p= 0.0167)
# Nod number
mod <- lm(NodNum ~ SoilConc * Genotype, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: NodNum
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 72.09 72.09 1.9701 0.17954
## Genotype 1 1185.80 1185.80 32.4084 3.331e-05 ***
## SoilConc:Genotype 1 278.49 278.49 7.6111 0.01398 *
## Residuals 16 585.43 36.59
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub2, aes(x = SoilConc, y = NodNum, Genotype = SoilConc)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(NodNum ~ SoilConc * Genotype, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: NodNum
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 160.45 80.22 2.0213 0.16000
## Genotype 1 1089.81 1089.81 27.4587 4.663e-05 ***
## SoilConc:Genotype 2 397.01 198.50 5.0014 0.01799 *
## Residuals 19 754.10 39.69
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub3, aes(x = SoilConc, y = NodNum, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 35 rows containing non-finite values (stat_summary).
tt = emmeans(mod, ~ SoilConc|Genotype)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Genotype estimate SE df t.ratio p.value
## high - low PI493292 -12.285714 4.347370 19 -2.826 0.0278
## high - none PI493292 -7.333333 5.143878 19 -1.426 0.3482
## low - none PI493292 4.952381 4.347370 19 1.139 0.5026
## high - low StAug2 4.000000 4.347370 19 0.920 0.6346
## high - none StAug2 -7.000000 5.751031 19 -1.217 0.4578
## low - none StAug2 -11.000000 5.051188 19 -2.178 0.1010
##
## P value adjustment: tukey method for comparing a family of 3 estimates
pairs(tt, simple = "Genotype")
## Genotype = PI493292:
## contrast estimate SE df t.ratio p.value
## high - low -12.285714 4.347370 19 -2.826 0.0278
## high - none -7.333333 5.143878 19 -1.426 0.3482
## low - none 4.952381 4.347370 19 1.139 0.5026
##
## Genotype = StAug2:
## contrast estimate SE df t.ratio p.value
## high - low 4.000000 4.347370 19 0.920 0.6346
## high - none -7.000000 5.751031 19 -1.217 0.4578
## low - none -11.000000 5.051188 19 -2.178 0.1010
##
## P value adjustment: tukey method for comparing a family of 3 estimates
tt = emmeans(mod, ~ Genotype| SoilConc)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilConc estimate SE df t.ratio p.value
## PI493292 - StAug2 high 4.000000 5.143878 19 0.778 0.4464
## PI493292 - StAug2 low 20.285714 3.367459 19 6.024 <.0001
## PI493292 - StAug2 none 4.333333 5.751031 19 0.753 0.4604
# Genotype and interaction are sig in both subsets. Within Native, H-L is sig (0.0278). Between genotypes, low is sig ( p < 0.001)
# Nod Weight
mod <- lm(NodWeight ~ SoilConc * Genotype, data = SRMortSub2)
anova(mod)
## Analysis of Variance Table
##
## Response: NodWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 1 1.1733e-05 1.1733e-05 3.1525 0.0948301 .
## Genotype 1 6.4082e-05 6.4082e-05 17.2175 0.0007543 ***
## SoilConc:Genotype 1 1.3536e-05 1.3536e-05 3.6369 0.0746312 .
## Residuals 16 5.9550e-05 3.7220e-06
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub2, aes(x = SoilConc, y = NodWeight, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 28 rows containing non-finite values (stat_summary).
mod <- lm(NodWeight ~ SoilConc * Genotype, data = SRMortSub3)
anova(mod)
## Analysis of Variance Table
##
## Response: NodWeight
## Df Sum Sq Mean Sq F value Pr(>F)
## SoilConc 2 2.5129e-05 1.2565e-05 3.5481 0.04905 *
## Genotype 1 9.2903e-05 9.2903e-05 26.2352 6.058e-05 ***
## SoilConc:Genotype 2 1.5723e-05 7.8620e-06 2.2201 0.13600
## Residuals 19 6.7282e-05 3.5410e-06
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ggplot(SRMortSub3, aes(x = SoilConc, y = NodWeight, colour = Genotype)) + stat_summary(fun.data = "mean_se") + facet_wrap(~ Genotype)
## Warning: Removed 35 rows containing non-finite values (stat_summary).
tt = emmeans(mod, ~ SoilConc|Genotype)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Genotype estimate SE df t.ratio p.value
## high - low PI493292 -0.0034666667 0.001298564 19 -2.670 0.0385
## high - none PI493292 -0.0045000000 0.001536482 19 -2.929 0.0224
## low - none PI493292 -0.0010333333 0.001298564 19 -0.796 0.7101
## high - low StAug2 0.0001238095 0.001298564 19 0.095 0.9950
## high - none StAug2 -0.0004833333 0.001717839 19 -0.281 0.9574
## low - none StAug2 -0.0006071429 0.001508795 19 -0.402 0.9150
##
## P value adjustment: tukey method for comparing a family of 3 estimates
pairs(tt, simple = "Genotype")
## Genotype = PI493292:
## contrast estimate SE df t.ratio p.value
## high - low -0.0034666667 0.001298564 19 -2.670 0.0385
## high - none -0.0045000000 0.001536482 19 -2.929 0.0224
## low - none -0.0010333333 0.001298564 19 -0.796 0.7101
##
## Genotype = StAug2:
## contrast estimate SE df t.ratio p.value
## high - low 0.0001238095 0.001298564 19 0.095 0.9950
## high - none -0.0004833333 0.001717839 19 -0.281 0.9574
## low - none -0.0006071429 0.001508795 19 -0.402 0.9150
##
## P value adjustment: tukey method for comparing a family of 3 estimates
tt = emmeans(mod, ~ Genotype| SoilConc)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast SoilConc estimate SE df t.ratio p.value
## PI493292 - StAug2 high 0.001066667 0.001536482 19 0.694 0.4959
## PI493292 - StAug2 low 0.004657143 0.001005864 19 4.630 0.0002
## PI493292 - StAug2 none 0.005083333 0.001717839 19 2.959 0.0081
# First subset, genotype is sig ( p < 0.001). 2nd subset, soil and genotype are sig (p = 0.049, p < 0.001). Within genotype, native H-N is sig (p = 0.0224). between genotypes, sig for low and none ( p = 0.002, p = 0.0081)
# Going back to trapping data to check for match x no match for mortality
# Create match variable
TrapMort <- within(TrapMort, MatchNoMatch <- ifelse(Range == "Native" & grepl("PT", Treatment), "Match", ifelse(Range == "Invaded" & grepl("FL", Treatment), "Match", "NoMatch")))
TrapMortSub <- subset(TrapMort, Treat == "Soil")
ggplot(TrapMortSub, aes(x = Genotype, y = Dead_0, colour = MatchNoMatch)) + stat_summary(fun.data = "mean_se") + coord_cartesian(ylim = c(0,1)) +theme_bw() + facet_wrap(~ Range, scales = "free_x")
mod <- glm(as.factor(Dead_0) ~ MatchNoMatch * Range, family = binomial(link = "logit"), data = TrapMortSub)
anova(mod, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: as.factor(Dead_0)
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 269 255.76
## MatchNoMatch 1 0.02493 268 255.74 0.8745
## Range 1 0.00242 267 255.73 0.9608
## MatchNoMatch:Range 1 2.13596 266 253.60 0.1439
tt = emmeans(mod, ~ Range| MatchNoMatch)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast MatchNoMatch estimate SE df z.ratio p.value
## Invaded - Native Match 0.4418328 0.4506021 Inf 0.981 0.3268
## Invaded - Native NoMatch -0.4928071 0.4624031 Inf -1.066 0.2865
##
## Results are given on the log odds ratio (not the response) scale.
tt = emmeans(mod, ~ MatchNoMatch | Range)
dd = pairs(tt)
summary(dd, by = NULL)
## contrast Range estimate SE df z.ratio p.value
## Match - NoMatch Invaded 0.5291748 0.4631177 Inf 1.143 0.2532
## Match - NoMatch Native -0.4054651 0.4498676 Inf -0.901 0.3674
##
## Results are given on the log odds ratio (not the response) scale.
# No Significance